package com.ruoyi.kycinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kycinfo.mapper.KycPotentialMapper;
import com.ruoyi.kycinfo.domain.KycPotential;
import com.ruoyi.kycinfo.service.IKycPotentialService;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class KycPotentialServiceImpl implements IKycPotentialService
{
    @Autowired
    private KycPotentialMapper kycPotentialMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param potentialId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public KycPotential selectKycPotentialByPotentialId(Long potentialId)
    {
        return kycPotentialMapper.selectKycPotentialByPotentialId(potentialId);
    }

    @Override
    public KycPotential selectKycPotentialByUserInfoId(Long userinfoId) {
        return kycPotentialMapper.selectKycPotentialByUserInfoId(userinfoId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param kycPotential 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<KycPotential> selectKycPotentialList(KycPotential kycPotential)
    {
        return kycPotentialMapper.selectKycPotentialList(kycPotential);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param kycPotential 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertKycPotential(KycPotential kycPotential)
    {
        kycPotential.setCreateTime(DateUtils.getNowDate());
        return kycPotentialMapper.insertKycPotential(kycPotential);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param kycPotential 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateKycPotential(KycPotential kycPotential)
    {
        kycPotential.setUpdateTime(DateUtils.getNowDate());
        return kycPotentialMapper.updateKycPotential(kycPotential);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param potentialIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteKycPotentialByPotentialIds(Long[] potentialIds)
    {
        return kycPotentialMapper.deleteKycPotentialByPotentialIds(potentialIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param potentialId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteKycPotentialByPotentialId(Long potentialId)
    {
        return kycPotentialMapper.deleteKycPotentialByPotentialId(potentialId);
    }

    @Override
    public List<KycPotential> selectKycPotentialListByUserInfoId(Long userInfoId) {
        KycPotential kycPotential = new KycPotential();
        kycPotential.setUserInfoId(userInfoId);
        return kycPotentialMapper.selectKycPotentialList(kycPotential);
    }

    @Override
    public int deleteKycPotentialByUserInfoId(long userInfoId) {
        return kycPotentialMapper.deleteKycPotentialByUserInfoId(userInfoId);
    }

    @Override
    public int deleteKycPotentialByUserInfoIds(Long[] userInfoIds) {
        return kycPotentialMapper.deleteKycPotentialByUserInfoIds(userInfoIds);
    }
}
